
function  [vectorOut, lastOut] =moveahead(vectorIn, vari)
%Function to exceed the vector
    vectorOut=horzcat(vectorIn,vari);          %concatenates the old vector and the new position
    lastOut=vectorOut(end);
end